<!-- 依赖注入 -->
<!-- 依赖注入是处理层级很深的父子组件数据关系，通过逐级prop传递会比较奇怪也不方便，此时会用到依赖注入 -->
<!-- 父组件提供依赖，子组件(无论层级)都可以注入依赖 -->
<script setup lang='ts'>
import { ref, provide } from 'vue'
import DependencyInjection from './components/dependencyInjection.vue'

const want = ref('getMarried')

provide('want', want.value)

</script>

<template>
  <div>
    <DependencyInjection/>
  </div>
</template>

<style lang='scss' scoped>

</style>